<template>
  <el-input @keydown.enter.native="enter" v-model.trim="formData" v-bind="$attrs"></el-input>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      default: "",
    },
  },
  name: "yyInput",
  computed: {
    formData: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      },
    },
  },
  data() {
    return {};
  },
  methods: {
    enter() {
      this.$emit("enter");
    },
  },
};
</script>

<style>
</style>